package com.glorysoft.knowlespda.ui.jobinfo.view

import android.os.Bundle
import com.glorysoft.knowlespda.BR
import com.glorysoft.knowlespda.R
import com.glorysoft.knowlespda.base.BaseActivity
import com.glorysoft.knowlespda.databinding.ActivityJobInfoBinding
import com.glorysoft.knowlespda.databinding.ActivityTrackBinding
import com.glorysoft.knowlespda.entity.LotEntity
import com.glorysoft.knowlespda.ui.jobinfo.viewmodel.JobInfoViewModel
import com.glorysoft.knowlespda.ui.updatecount.viewmodel.UpdateCountViewModel

/**
 * FileName: HomeActivity
 * Author: XJH
 * Date: 2021/7/12 17:19
 * Description:
 * History:
 */
class JobInfoActivity : BaseActivity<JobInfoViewModel, ActivityJobInfoBinding>() {
    override fun layoutId(): Int {
        return R.layout.activity_job_info
    }

    override fun initVariableId(): Int {
        return BR.jobInfoViewModel
    }

    override fun initView(savedInstanceState: Bundle?) {
        setTitle("Job Info")
//        val lotData = intent.getSerializableExtra("LOTDATA") as LotEntity
        val magazineNo = intent.getStringExtra("MAGAZINENO")

        viewModel.getJobInfo(magazineNo)
    }

    override fun initData() {
        viewModel.defUI.callObserve.observe(this){
            mBinding.setVariable(BR.jobInfoViewModel,viewModel)
        }
    }
}